Function New-TaskConnection(){
    [CmdletBinding()]param(
		[string]$vdi=$env:COMPUTERNAME,
		[string]$domain="nam",
		[string]$fid="aaadmin",
		[string]$pswd
	)
	Try{
	    If( !(Get-Variable "TSC_$vdi" -Scope Global -ea 4)){ # tsc == task connection
			If( $vdi -eq $env:COMPUTERNAME){ # for local 
			    $tsc = [Microsoft.Win32.TaskScheduler.TaskService]::new()
			}else{ # for remote
				$tsc = [Microsoft.Win32.TaskScheduler.TaskService]::new($vdi,$fid,$domain,$pswd,$true)
			}
			Set-Variable -Name "TSC_$vdi" -Value $tsc -Scope Global -Force
		}
		return (Get-Variable "TSC_$vdi").Value
	}Catch{
	    throw $_
	}Finally{}
}
